package demo2;

import org.omg.CORBA.PUBLIC_MEMBER;

abstract class Anmial {
     public String name;
     public  int age;
     public Anmial(String name, int age){
         this.age=age;
         this.name=name;
     }
}
interface  IFly{
     void fly();
}
interface  IRun{
     void run();
}
interface ISwim{
     void swim();
}
class Duck extends Anmial implements  ISwim,  IRun,IFly{
    public  Duck(String name,int age){
        super(name,age);
    }

    @Override
    public void run() {

    }

    @Override
    public void fly() {

    }

    @Override
    public void swim() {

    }
}
class Dog extends Anmial implements IRun{
     public  Dog(String name,int age){
         super(name,age);
     }

    @Override
    public void run() {
        System.out.println(this.name+"正在跑");
    }
}

